<?php
namespace app\app\validate;
use think\Validate;

class Goods extends Validate{

	protected $rule = [
		'name'  => 'require',
		'price' => 'require',
		'image' => 'require',
		'cate_id' => 'require|number'
	];

	protected $message = [
		'name.require'   => '商品名必填',
		'price.require'  => '价格必填',
		'image.require'  => '图片必填',
		'cate_id.require'=> '分类id必填',
		'cate_id.number' => '分类只能为数字'
	];
}